﻿<ResourceDictionary
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:controls="clr-namespace:SilverFlow.Controls"
  xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows" 
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
  xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" mc:Ignorable="d">

	<Style TargetType="controls:FloatingWindow">
		<Setter Property="Width" Value="300"/>
		<Setter Property="Height" Value="200"/>
		<Setter Property="IsTabStop" Value="false"/>
		<Setter Property="TabNavigation" Value="Cycle"/>
		<Setter Property="HorizontalAlignment" Value="Center"/>
		<Setter Property="VerticalAlignment" Value="Center"/>
		<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
		<Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush" Value="#FFA2ADB8"/>
        <Setter Property="Background" Value="#FFE7EBED" />
        <Setter Property="TitleBackground">
			<Setter.Value>
				<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                    <GradientStop Color="#FFFBFBFB" Offset="0"/>
                    <GradientStop Color="#FFE0E4E7" Offset="1"/>
				</LinearGradientBrush>
			</Setter.Value>
		</Setter>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="controls:FloatingWindow">
					<Grid x:Name="Root" RenderTransformOrigin="0.5,0.5">
						<Grid.Resources>
                            <Style x:Key="CloseButtonStyle" TargetType="Button">
								<Setter Property="Foreground" Value="#FF9E9E9E"/>
                                <Setter Property="BorderBrush" Value="#FF9E9E9E"/>
								<Setter Property="BorderThickness" Value="0.7"/>
								<Setter Property="Width" Value="17"/>
								<Setter Property="Height" Value="16"/>
								<Setter Property="Template">
									<Setter.Value>
                                        <ControlTemplate TargetType="Button">
											<Grid x:Name="grid" HorizontalAlignment="Center" VerticalAlignment="Center" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" UseLayoutRounding="False">
												<VisualStateManager.VisualStateGroups>
													<VisualStateGroup x:Name="CommonStates">
														<VisualState x:Name="Normal"/>
														<VisualState x:Name="MouseOver">
															<Storyboard>
                                                                <ColorAnimation Duration="0" To="Black" Storyboard.TargetProperty="(Path.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="path" d:IsOptimized="True"/>
                                                                <ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                <ColorAnimation Duration="0" To="#FFC9CDD4" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
																<ColorAnimation Duration="0" To="#FF899199" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
															</Storyboard>
														</VisualState>
														<VisualState x:Name="Pressed">
															<Storyboard>
                                                                <ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Path.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="path" d:IsOptimized="True"/>
                                                                <ColorAnimation Duration="0" To="#FFD40606" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
																<ColorAnimation Duration="0" To="Maroon" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
																<ColorAnimation Duration="0" To="#FFFFAC85" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
															</Storyboard>
														</VisualState>
														<VisualState x:Name="Disabled">
															<Storyboard>
																<DoubleAnimation Duration="0" Storyboard.TargetName="X" Storyboard.TargetProperty="Opacity" To="0.5"/>
															</Storyboard>
														</VisualState>
													</VisualStateGroup>
												</VisualStateManager.VisualStateGroups>
                                                <Border x:Name="border" UseLayoutRounding="False" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1.5">
													<Border.Background>
														<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
															<GradientStop Offset="0"/>
															<GradientStop Offset="1"/>
														</LinearGradientBrush>
													</Border.Background>
                                                    <Grid>
                                                        <Path x:Name="path" Data="M0,0 L0.9371469,0 L4.000001,3.0628543 L7.0628557,0 L8,0 L8,1.073151 L5.0731506,3.9999998 L8,6.9268494 L8,8 L6.9278555,8 L4.000001,5.0721459 L1.0721471,8 L0,8 L0,7.0948515 L3.0948515,3.9999998 L0,0.90514863 z" 
												            Fill="{TemplateBinding Foreground}" HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="Fill" StrokeThickness="0" UseLayoutRounding="False" Width="7" Height="7"/>
                                                    </Grid>
												</Border>
											</Grid>
										</ControlTemplate>
									</Setter.Value>
								</Setter>
							</Style>
                            <Style x:Key="MaximizeButtonStyle" TargetType="Button">
                                <Setter Property="Foreground" Value="#FF9E9E9E"/>
                                <Setter Property="BorderBrush" Value="#FF9E9E9E"/>
                                <Setter Property="BorderThickness" Value="0.7"/>
                                <Setter Property="Width" Value="17"/>
                                <Setter Property="Height" Value="16"/>
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="Button">
                                            <Grid x:Name="grid" HorizontalAlignment="Center" VerticalAlignment="Center" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" UseLayoutRounding="False">
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup x:Name="CommonStates">
                                                        <VisualState x:Name="Normal"/>
                                                        <VisualState x:Name="MouseOver">
                                                            <Storyboard>
                                                                <ColorAnimation Duration="0" To="Black" Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="top" d:IsOptimized="True"/>
                                                                <ColorAnimation Duration="0" To="Black" Storyboard.TargetProperty="(Rectangle.Stroke).(SolidColorBrush.Color)" Storyboard.TargetName="rect" d:IsOptimized="True"/>
                                                                <ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                <ColorAnimation Duration="0" To="#FFC9CDD4" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                <ColorAnimation Duration="0" To="#FF899199" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Pressed">
                                                            <Storyboard>
                                                                <ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="top" d:IsOptimized="True"/>
                                                                <ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Rectangle.Stroke).(SolidColorBrush.Color)" Storyboard.TargetName="rect" d:IsOptimized="True"/>
                                                                <ColorAnimation Duration="0" To="#FF003D80" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                <ColorAnimation Duration="0" To="#FF85EBFF" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                <ColorAnimation Duration="0" To="#FF0667D4" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimation Duration="0" Storyboard.TargetName="X" Storyboard.TargetProperty="Opacity" To="0.5"/>
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <Border x:Name="border" UseLayoutRounding="False" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1.5">
                                                    <Border.Background>
                                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                            <GradientStop Offset="0"/>
                                                            <GradientStop Offset="1"/>
                                                        </LinearGradientBrush>
                                                    </Border.Background>
                                                    <Grid Width="9" Height="8" VerticalAlignment="Center" HorizontalAlignment="Center" UseLayoutRounding="False">
                                                        <Rectangle x:Name="top" HorizontalAlignment="Center" VerticalAlignment="Top" 
															StrokeThickness="0" UseLayoutRounding="False" Width="9" Height="2" Fill="{TemplateBinding Foreground}" />
                                                        <Rectangle x:Name="rect" Stroke="{TemplateBinding Foreground}" HorizontalAlignment="Center" VerticalAlignment="Top" 
															StrokeThickness="0.7" UseLayoutRounding="False" Width="9" Height="8" />
                                                    </Grid>
                                                </Border>
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                            <Style x:Key="RestoreButtonStyle" TargetType="Button">
                                <Setter Property="Foreground" Value="#FF9E9E9E"/>
                                <Setter Property="BorderBrush" Value="#FF9E9E9E"/>
                                <Setter Property="BorderThickness" Value="0.7"/>
                                <Setter Property="Width" Value="17"/>
                                <Setter Property="Height" Value="16"/>
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="Button">
                                            <Grid x:Name="grid" HorizontalAlignment="Center" VerticalAlignment="Center" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" UseLayoutRounding="False">
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup x:Name="CommonStates">
                                                        <VisualState x:Name="Normal"/>
                                                        <VisualState x:Name="MouseOver">
                                                        	<Storyboard>
                                                        		<ColorAnimation Duration="0" To="Black" Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="top" d:IsOptimized="True"/>
                                                        		<ColorAnimation Duration="0" To="Black" Storyboard.TargetProperty="(Rectangle.Stroke).(SolidColorBrush.Color)" Storyboard.TargetName="rect" d:IsOptimized="True"/>
                                                        		<ColorAnimation Duration="0" To="Black" Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="topBack" d:IsOptimized="True"/>
                                                        		<ColorAnimation Duration="0" To="Black" Storyboard.TargetProperty="(Rectangle.Stroke).(SolidColorBrush.Color)" Storyboard.TargetName="rectBack" d:IsOptimized="True"/>
                                                        		<ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                        		<ColorAnimation Duration="0" To="#FFC9CDD4" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                        		<ColorAnimation Duration="0" To="#FF899199" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                        	</Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Pressed">
                                                        	<Storyboard>
                                                        		<ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="top" d:IsOptimized="True"/>
                                                        		<ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Rectangle.Stroke).(SolidColorBrush.Color)" Storyboard.TargetName="rect" d:IsOptimized="True"/>
                                                        		<ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="topBack" d:IsOptimized="True"/>
                                                        		<ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Rectangle.Stroke).(SolidColorBrush.Color)" Storyboard.TargetName="rectBack" d:IsOptimized="True"/>
                                                        		<ColorAnimation Duration="0" To="#FF003D80" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                        		<ColorAnimation Duration="0" To="#FF85EBFF" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                        		<ColorAnimation Duration="0" To="#FF0667D4" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                        	</Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimation Duration="0" Storyboard.TargetName="X" Storyboard.TargetProperty="Opacity" To="0.5"/>
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <Border x:Name="border" UseLayoutRounding="False" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1.5">
                                                    <Border.Background>
                                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                            <GradientStop Offset="0"/>
                                                            <GradientStop Offset="1"/>
                                                        </LinearGradientBrush>
                                                    </Border.Background>
                                                    <Grid Width="9" Height="8" VerticalAlignment="Center" HorizontalAlignment="Center" UseLayoutRounding="False">
                                                    	<Canvas>
	                                                        <Rectangle x:Name="top"
																StrokeThickness="0" UseLayoutRounding="False" Width="7" Height="2" Fill="{TemplateBinding Foreground}" Canvas.Top="3" />
	                                                        <Rectangle x:Name="rect" Stroke="{TemplateBinding Foreground}" 
																StrokeThickness="0.7" UseLayoutRounding="False" Width="7" Height="5" Canvas.Top="3" />
                                                    		<Path x:Name="rectBack" Data="M0.35,0.345 L6.65,0.35 L6.65,5.65 L4.65,5.65 L4.65,3.65625 L0.35,3.65625 z" Height="6" Canvas.Left="2" 
                                                    			Stretch="Fill" Stroke="{TemplateBinding Foreground}" StrokeThickness="0.7" UseLayoutRounding="False" Width="7" />
	                                                        <Rectangle x:Name="topBack"
	                                                        	StrokeThickness="0" UseLayoutRounding="False" Width="7" Height="2" Fill="{TemplateBinding Foreground}" Canvas.Left="2" />
														</Canvas>
                                                    </Grid>
                                                </Border>
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                            <Style x:Key="MinimizeButtonStyle" TargetType="Button">
                                <Setter Property="Foreground" Value="#FF9E9E9E"/>
                                <Setter Property="BorderBrush" Value="#FF9E9E9E"/>
                                <Setter Property="BorderThickness" Value="0.7"/>
                                <Setter Property="Width" Value="17"/>
                                <Setter Property="Height" Value="16"/>
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="Button">
                                            <Grid x:Name="grid" HorizontalAlignment="Center" VerticalAlignment="Center" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" UseLayoutRounding="False">
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup x:Name="CommonStates">
                                                        <VisualState x:Name="Normal"/>
                                                        <VisualState x:Name="MouseOver">
                                                            <Storyboard>
                                                                <ColorAnimation Duration="0" To="Black" Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="top" d:IsOptimized="True"/>
                                                                <ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                <ColorAnimation Duration="0" To="#FFC9CDD4" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                <ColorAnimation Duration="0" To="#FF899199" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Pressed">
                                                            <Storyboard>
                                                                <ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="top" d:IsOptimized="True"/>
                                                                <ColorAnimation Duration="0" To="#FF003D80" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                <ColorAnimation Duration="0" To="#FF85EBFF" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                                <ColorAnimation Duration="0" To="#FF0667D4" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimation Duration="0" Storyboard.TargetName="X" Storyboard.TargetProperty="Opacity" To="0.5"/>
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <Border x:Name="border" UseLayoutRounding="False" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="1.5">
                                                    <Border.Background>
                                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                                            <GradientStop Offset="0"/>
                                                            <GradientStop Offset="1"/>
                                                        </LinearGradientBrush>
                                                    </Border.Background>
                                                	<Grid Width="9" Height="8" UseLayoutRounding="False">
                                                		<Rectangle x:Name="top" HorizontalAlignment="Center" VerticalAlignment="Bottom" 
                                                			StrokeThickness="0" UseLayoutRounding="False" Width="9" Height="2" Fill="{TemplateBinding Foreground}" />
                                                	</Grid>
                                                </Border>
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </Grid.Resources>
						<Grid.RenderTransform>
							<CompositeTransform/>
						</Grid.RenderTransform>
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="WindowStates">
								<VisualState x:Name="Open">
									<Storyboard>
										<PointAnimation Duration="0" To="0,0" Storyboard.TargetProperty="(UIElement.RenderTransformOrigin)" Storyboard.TargetName="ContentRoot" d:IsOptimized="True"/>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ContentRoot">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(UIElement.RenderTransform).(Children)[0].ScaleX">
											<SplineDoubleKeyFrame KeyTime="0" Value="0"/>
											<SplineDoubleKeyFrame KeyTime="00:00:0.3" Value="1" KeySpline="0,0.86,0.19,1"/>
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(UIElement.RenderTransform).(Children)[0].ScaleY">
											<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
											<SplineDoubleKeyFrame KeyTime="00:00:0.3" Value="1" KeySpline="0,0.86,0.19,1"/>
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Closed">
									<Storyboard>
										<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="Opacity">
											<SplineDoubleKeyFrame KeyTime="0" Value="1"/>
											<SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="0"/>
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
                                <VisualState x:Name="Minimized">
									<Storyboard>
                                        <PointAnimation Duration="0" To="0,1" Storyboard.TargetProperty="(UIElement.RenderTransformOrigin)" Storyboard.TargetName="ContentRoot" d:IsOptimized="True"/>
                                        <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(UIElement.RenderTransform).(Children)[0].ScaleX">
											<SplineDoubleKeyFrame KeyTime="0" Value="1"/>
											<SplineDoubleKeyFrame KeyTime="00:00:0.2" Value="0"/>
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(UIElement.RenderTransform).(Children)[0].ScaleY">
											<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
											<SplineDoubleKeyFrame KeyTime="00:00:0.2" Value="0"/>
										</DoubleAnimationUsingKeyFrames>
										<DoubleAnimationUsingKeyFrames Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="Opacity">
											<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
											<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
										</DoubleAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:0.2" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:0.2">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
								</VisualState>
                                <VisualState x:Name="Restored">
                                    <Storyboard>
                                        <PointAnimation Duration="0" To="0,1" Storyboard.TargetProperty="(UIElement.RenderTransformOrigin)" Storyboard.TargetName="ContentRoot" d:IsOptimized="True"/>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ContentRoot">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(UIElement.RenderTransform).(Children)[0].ScaleX">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                                            <SplineDoubleKeyFrame KeyTime="00:00:0.3" Value="1" KeySpline="0,0.86,0.19,1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetName="ContentRoot" Storyboard.TargetProperty="(UIElement.RenderTransform).(Children)[0].ScaleY">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                            <SplineDoubleKeyFrame KeyTime="00:00:0.3" Value="1" KeySpline="0,0.86,0.19,1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<VisualStateManager.CustomVisualStateManager>
							<ei:ExtendedVisualStateManager/>
						</VisualStateManager.CustomVisualStateManager>
						<Grid x:Name="ContentRoot" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}" 
							  RenderTransformOrigin="0,0" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
							<Grid.Effect>
								<DropShadowEffect ShadowDepth="0.5" Opacity="0.3" BlurRadius="12" />
							</Grid.Effect>
							<Grid.RenderTransform>
								<TransformGroup>
									<ScaleTransform />
									<SkewTransform />
									<RotateTransform />
									<TranslateTransform />
								</TransformGroup>
							</Grid.RenderTransform>
							<Border x:Name="ContentBorder" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" 
								BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="3">
								<Grid>
									<Grid.RowDefinitions>
										<RowDefinition Height="Auto"/>
										<RowDefinition/>
									</Grid.RowDefinitions>
                                    <Border x:Name="Chrome" Width="Auto" Background="{TemplateBinding TitleBackground}" UseLayoutRounding="False" CornerRadius="3,3,0,0">
										<Grid Height="Auto" Width="Auto" UseLayoutRounding="False">
											<Grid.ColumnDefinitions>
												<ColumnDefinition/>
                                                <ColumnDefinition Width="Auto"/>
                                                <ColumnDefinition Width="Auto"/>
                                                <ColumnDefinition Width="6"/>
                                            </Grid.ColumnDefinitions>
                                            <ContentControl Content="{TemplateBinding Title}" 
												IsTabStop="False" 
												HorizontalAlignment="Stretch"
												VerticalAlignment="Center"
												Margin="6,3,6,3" UseLayoutRounding="False" />
											<StackPanel x:Name="MenuPanel" Orientation="Horizontal"  Grid.Column="1">
												<Button x:Name="MinimizeButton" IsTabStop="False" VerticalAlignment="Center" UseLayoutRounding="False"
													Style="{StaticResource MinimizeButtonStyle}" Margin="0,2,1,2">
													<ToolTipService.ToolTip>
														<ToolTip Content="Minimize" />
													</ToolTipService.ToolTip>
												</Button>
												<Button x:Name="RestoreButton" IsTabStop="False" VerticalAlignment="Center" UseLayoutRounding="False"
													Style="{StaticResource RestoreButtonStyle}" Visibility="Collapsed" Margin="0,2,1,2">
													<ToolTipService.ToolTip>
														<ToolTip Content="Restore" />
													</ToolTipService.ToolTip>
												</Button>
												<Button x:Name="MaximizeButton" IsTabStop="False" VerticalAlignment="Center" UseLayoutRounding="False"
													Style="{StaticResource MaximizeButtonStyle}" Margin="0,2,1,2">
													<ToolTipService.ToolTip>
														<ToolTip Content="Maximize" />
													</ToolTipService.ToolTip>
												</Button>
											</StackPanel>
                                            <Button x:Name="CloseButton" Grid.Column="2" IsTabStop="False" VerticalAlignment="Center" UseLayoutRounding="False"
												Style="{StaticResource CloseButtonStyle}" Margin="0,2">
                                                <ToolTipService.ToolTip>
                                                    <ToolTip Content="Close" />
                                                </ToolTipService.ToolTip>
                                            </Button>
                                        </Grid>
									</Border>
									<Border Grid.Row="1">
										<ContentPresenter x:Name="ContentPresenter" Content="{TemplateBinding Content}"
												ContentTemplate="{TemplateBinding ContentTemplate}"
												HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
												VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
									</Border>
								</Grid>
							</Border>
						</Grid>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
    <Style x:Key="BootstrapButtonStyle" TargetType="Button">
        <Setter Property="Width" Value="64"/>
        <Setter Property="Height" Value="11"/>
		<Setter Property="BorderBrush" Value="#E56E6E6E"/>
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Border x:Name="outline" BorderThickness="0.8,0.8,0.8,0" CornerRadius="4,4,0,0" BorderBrush="{TemplateBinding BorderBrush}" 
						Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" UseLayoutRounding="False">
                    	<Border.Background>
                    		<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                				<GradientStop Color="#FFFBFBFB" Offset="0"/>
                				<GradientStop Color="#E6E0E4E7" Offset="1"/>
                			</LinearGradientBrush>
                    	</Border.Background>
                		<Border.Effect>
                			<DropShadowEffect ShadowDepth="0.5" Opacity="0.4" BlurRadius="8" />
                		</Border.Effect>
                		<VisualStateManager.VisualStateGroups>
                			<VisualStateGroup x:Name="CommonStates">
                				<VisualState x:Name="Disabled"/>
                				<VisualState x:Name="Normal"/>
                				<VisualState x:Name="MouseOver">
                					<Storyboard>
                						<ColorAnimation Duration="0" To="Black" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="triangle" d:IsOptimized="True"/>
                						<ColorAnimation Duration="0" To="#FFBFC3CA" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="outline" d:IsOptimized="True"/>
                					</Storyboard>
                				</VisualState>
                				<VisualState x:Name="Pressed">
                					<Storyboard>
                						<ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)" Storyboard.TargetName="triangle" d:IsOptimized="True"/>
                						<ColorAnimation Duration="0" To="#FF4672A3" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="outline" d:IsOptimized="True"/>
                						<ColorAnimation Duration="0" To="#FFBAF4FF" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="outline" d:IsOptimized="True"/>
                					</Storyboard>
                				</VisualState>
                			</VisualStateGroup>
                		</VisualStateManager.VisualStateGroups>
                		<Path x:Name="triangle" Data="M27.671843,6 L31.333334,2 L35.02343,6 z" 
							HorizontalAlignment="Center" Height="4" Stretch="Fill" UseLayoutRounding="False" 
							VerticalAlignment="Center" Width="8" Fill="#FF9E9E9E" Margin="0,-1,0,0"/>
                	</Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="controls:Taskbar">
        <Setter Property="Width" Value="Auto"/>
        <Setter Property="Height" Value="Auto"/>
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:Taskbar">
                    <StackPanel x:Name="LayoutRoot">
                        <Button x:Name="OpenButton" Style="{StaticResource BootstrapButtonStyle}" Margin="0,0,0,-1"/>
                        <Border x:Name="Bar" BorderBrush="#7FFFFFFF" BorderThickness="0,0.7,0,0" Height="100" Padding="0,5">
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#3F000000"/>
                                    <GradientStop Color="#66000000" Offset="1"/>
                                </LinearGradientBrush>
                            </Border.Background>
                            <Canvas Margin="0,-45,0,0">
                                <Border x:Name="SlidingBar" Height="135" VerticalAlignment="Bottom">
                                    <StackPanel x:Name="Carousel" RenderTransformOrigin="0.5,1"
									    Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Bottom">
                                    </StackPanel>
                                </Border>
                            </Canvas>
                        </Border>
                    </StackPanel>
                </ControlTemplate>
        </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="controls:WindowIcon">
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:WindowIcon">
                    <Border x:Name="border" Background="#01FFFFFF" Width="120" Height="90" Padding="2,2" 
                        VerticalAlignment="Bottom" RenderTransformOrigin="0.5,1" 
						BorderBrush="#01000000" CornerRadius="3" BorderThickness="0.7">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                            	<VisualStateGroup.Transitions>
                            		<VisualTransition From="MouseOver" GeneratedDuration="0:0:0.3" To="Normal">
                            			<VisualTransition.GeneratedEasingFunction>
                            				<QuadraticEase EasingMode="EaseOut"/>
                            			</VisualTransition.GeneratedEasingFunction>
                            		</VisualTransition>
                            	</VisualStateGroup.Transitions>
                                <VisualState x:Name="Disabled"/>
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                	<Storyboard>
                                		<DoubleAnimation Duration="0:0:0.3" To="180" Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="border" d:IsOptimized="True">
                                			<DoubleAnimation.EasingFunction>
                                				<QuadraticEase EasingMode="EaseOut"/>
                                			</DoubleAnimation.EasingFunction>
                                		</DoubleAnimation>
                                		<DoubleAnimation Duration="0:0:0.3" To="135" Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="border" d:IsOptimized="True">
                                			<DoubleAnimation.EasingFunction>
                                				<QuadraticEase EasingMode="EaseOut"/>
                                			</DoubleAnimation.EasingFunction>
                                		</DoubleAnimation>
                                		<ColorAnimation Duration="0" To="#7EFFFFFF" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                		<ColorAnimation Duration="0" To="#97000000" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                	</Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                	<Storyboard>
                                		<DoubleAnimation Duration="0" To="180" Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                		<DoubleAnimation Duration="0" To="135" Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                		<ColorAnimation Duration="0" To="#7FFFFFFF" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                		<ColorAnimation Duration="0" To="#B3000000" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
                                	</Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
							<Border Grid.Row="0" Padding="2">
                            	<Image x:Name="Thumbnail" Stretch="Uniform" VerticalAlignment="Top">
									<Image.Effect>
										<DropShadowEffect ShadowDepth="0.6" Opacity="0.5" BlurRadius="6" />
									</Image.Effect>
								</Image>
							</Border>
							<Border Grid.Row="1" HorizontalAlignment="Center">
                            	<TextBlock x:Name="Title" Foreground="White" VerticalAlignment="Center" Margin="5,2" 
									TextTrimming="WordEllipsis" FontSize="10.667" />
							</Border>
                        </Grid>
					</Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
</ResourceDictionary>
